package com.dexgdx.game.structure.actor;

import com.dexgdx.game.constants.ERingColor;
import com.dexgdx.game.structure.base.BaseObject;
import com.dexgdx.game.structure.base.BaseRegion;
import com.dexgdx.game.structure.base.MobileObject;
import com.dexgdx.game.util.ObjectIdentification;

public abstract class AbstractActor extends MobileObject {
	
	private static final long serialVersionUID = 4783108189582861810L;

	protected boolean attacking;
	protected BaseObject attackingTarget;
	
	private boolean selected;
	
	public AbstractActor(String imagePath, float x, float y, float height, float width, float movementSpeed, ObjectIdentification objectId) {
		super(x, y, height, width, movementSpeed, true, true, objectId);
	}

	public abstract ERingColor getRingColor();

	@Override
	public void startMoving(BaseRegion target){
		super.startMoving(target);
	}

	@Override
	public void stopMoving(){
		super.stopMoving();
	}
	
	public void startAttacking(BaseObject attackingTarget){
		this.attackingTarget = attackingTarget;
		setAttacking(true);
	}
	public void stopAttacking(){
		this.attackingTarget = null;
		setAttacking(false);
	}
	
	public BaseObject getAttackingTarget() {
		return attackingTarget;
	}

	public boolean isSelected() {
		return selected;
	}

	public void setSelected(boolean selected) {
		this.selected = selected;
	}

	public boolean isAttacking() {
		return attacking;
	}

	public void setAttacking(boolean attacking) {
		this.attacking = attacking;
	}
}
